home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
- _______
- ____|__ | (TM)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
-
- MARGARINE Version 3.2
- Copyright 1991-1993 by Tay-Jee Software
-
- OK, so why is this program called MARGARINE? Because it
- "spreads" the MARGins of your text files!!
-
- So much for bad humor...
-
- If you evaluate alot of shareware programs (and I do), you
- might be annoyed at how so many times the left margin of the
- documentation file is in column 0, or there are no page breaks
- or page numbers. When printing out the file, this can lead to
- a really lopsided-looking document, especially if the right
- margin is in the 60-70 column range. If you wanted to punch
- holes in the document and put it into a binder, you would end
- up punching out some of the text in the first few columns.
- While several print utilities such as Norm Patriquin's PPRINT
- (an excellent program, by the way) allow you to specify a left
- margin while printing, they have several drawbacks:
-
- a) if you select too large of a value for the left
- margin, some lines will "overflow" onto the next
- line. This, in turn, will screw up page formatting
- and page lengths.
-
- b) most of these programs take over your machine instead
- of running in the background like DOS print. This can
- be a real inconvenience when printing 200K+ documentation
- files.
-
- OK, so what's the point?
-
- MARGARINE 3.2 is a very simple program I wrote to overcome
- both of these problems. First, MARGARINE will scan your entire
- document in order to find the longest single line. Based on
- this length, it calculates how much of a "buffer" can be added
- to each line in the file without pushing the right margin off
- the edge of the screen/paper. MARGARINE will then add whatever
- amount of "padding" you specify to the left margin of the doc-
-
- Page 1
-
-
-
-
-
- ument and write the result to a new file. Optionally, MARGA-
- RINE will add top and bottom margins and paginate your docu-
- ment for you. The resulting document can then be printed from
- the DOS command line (using PRINT.COM or PRINT.EXE) and will
- have a nice left margin.
-
-
- STARTING THE PROGRAM
-
- MARGARINE Version 3.2 contains a new menu-driven interface.
- In order to make use of the interface, type MARG by itself on
- the command line.
-
- When the program begins, you will see a square menu centered
- on the screen. Several options will be listed on the lefthand
- side of the menu, with the first highlighted. Space exists on
- the righthand side of the menu for various program information.
-
- Select an option by using the up/down cursor keys to position
- the highlight over the desired option, then pressing Enter.
- Each option will require you to select information from a scrol-
- ling menu, or to type in information in a dialog box. Options
- (and corresponding input choices) are described below:
-
- INPUT FILE: Select this option to specify the name of a file
- to format. A list of all files in the CURRENT directory will be
- displayed on the center of the screen. Scroll up and down the
- list until you find the file you want, then press Enter. The
- selected file name will appear on the menu.
-
- OUTPUT FILE: Select this option to specify a file name to
- which the formatted text will be written. Type any legal DOS
- filename in the dialog box.
-
- TOP MARGIN: Select this option to specify a top page margin
- in rows. A maximum of 30 rows a permitted.
-
- BOTTOM MARGIN: Select this option to specify a bottom page
- margin in rows. A maximum of 30 rows are permitted, and the
- bottom margin must be at least two rows if page numbers are re-
- quested.
-
- COLUMN WIDTH: Select this option to specify the width in
- characters of the page you would like to use. The default val-
- ue is 80 characters. Other common values are 96 or 120 (equal
- to 12 CPI and 15 CPI text, respectively.
-
- PAGE NUMBERS: Use this option to specify whether or not to
- paginate the formatted document.
-
- FORM FEEDS: Use this option to tell MARGARINE how to handle
- form feed characters encountered in the input file. Select "No
- Action" to simply leave the form feeds exactly where they were
- in the original file. Select "Force page" to maintain the rel-
-
- Page 2
-
-
-
-
-
- ative position of the form feed within the document and adjust
- page numbers. Select "Remove & ignore" to strip the form feeds
- out of the document.
-
- CONVERT CHARS: Many printers emulate the Epson character
- set which replaces the IBM extended characters with italic let-
- ters. These IBM characters are often used in documentation to
- create boxes, tables, etc. Setting this option to "YES" causes
- all extended box and line characters to be replaced by charac-
- ters from the Epson standard character set.
-
- LASER FORMAT: When used in conjunction with top and bottom |
- margins or pagination, Margarine will normally set the page |
- length to 66 lines, the standard for dot matrix printers. When |
- "Yes" is selected under this item, the page length used will be |
- 60 lines, the standard for most laser printers. |
-
- Once you have selected all the applicable options, you can
- hit F10 to begin formatting the text file, or ESC to abort to
- DOS.
-
-
- Help
-
- To obtain help from the menu, press F1. Help for the spec-
- ific menu item will appear in a dialog box. You can use the
- cursor arrows to scroll the text and view the entire help text.
-
-
- Command Line Operation
-
- To run the program from the command line, use the following
- syntax:
-
- MARG file [outfile] [/A] [/Cn] [/Tn [/Bn] [/P] [/FÒ] [/E] [/H] |
-
- file -- This is the name of the file you would like to
- modify. This is required. The file must be in the cur-
- rent directory.
-
- outfile -- This is the name of the new file which will
- be written, containing the changes made to the original
- input file. If none is specified, the first two char-
- acters of input file will be changed to "$" and this will
- become the output file.
-
- /A -- Use laser printer standard of 60 lines per page rather |
- than 66 lines. |
-
- /Cn -- Set column width. Normally, MARGARINE assumes you
- want a document with 80 columns. Use this switch to specify
- an alternate width between 25 and 132 columns. This will
- have an impact on how much space is available for the inser-
- tion of a left margin. Replace 'n' with the number of col-
-
- Page 3
-
-
-
-
-
- umns you desire. If you specify less than 25 or more than
- 132 columns, the default of 80 columns will be used.
-
- /Tn -- Set top margin. Replace 'n' with the number of
- lines you would like for a top margin. This number must
- be between 0 and 30.
-
- /Bn -- Set bottom margin. Replace 'n' with the number
- of lines you would like for a bottom margin. This number
- must also be between 0 and 30. If not specified, this will
- become the same as the top margin. If you do not specify a
- top margin, the bottom margin will always be zero and this
- switch will be ignored.
-
- /P -- Include page numbers. A page number will be added
- to each page of the document. The page number will be cen-
- tered on the bottom of each page, including the last. You
- must have specified a bottom margin of at least two lines.
-
- /FÒ -- Form feeds. This switch will affect the way in which
- MARGARINE handles form feed characters (ASCII 12) embedded
- in the input file. /F+ will keep the form feeds in place,
- forcing a new page at the designated position. Page numbers
- will be preserved if the /P option has also been specified.
- /F- will cause MARGARINE to remove all form feed characters.
-
- /E -- Extended character conversion. Replaces all extended
- box and line drawing characters with standard characters for
- printing on printers using Epson emulation.
-
- /H -- Help screen. A brief help screen will be displayed
- when MARG is entered alone on the command line or in con-
- junction with the /H switch. The DOS errorlevel is set to
- 1 when the /H switch is used.
-
- The command line switches may be preceded by either the "/"
- or "-" character and may be entered in any order. The names of
- the input and output files MUST be the first and second argu-
- ments entered on the command line, respectively, and must be
- legal DOS file names. The only exception to this is the /H
- switch which must be entered alone on the command line with the
- "MARG" command.
-
- Command Examples:
-
- To add a left margin to the file TEST.DOC and write output
- to the file $$ST.DOC:
-
- MARG test.doc
-
-
- To add a left margin to the file TEST.DOC, write the output
- to TEST.TXT, and use a column width of 96 (12 CPI Prestige):
-
-
- Page 4
-
-
-
-
-
- MARG test.doc test.txt /c96
-
-
- To add a left margin to the file TEST.DOC, with one-inch
- top and bottom margins, and write output to the file $$ST.DOC:
-
- MARG test.doc /t6
-
-
- To add a left margin to the file TEST.DOC, write output to
- TEST.TXT, with top margin of one inch and bottom margin of a
- half inch, with page numbers and page width of 64 (8 CPI):
-
- MARG test.doc test.txt /t6 /b3 /p /c64
-
-
- Be careful! MARGARINE is not very intelligent, and it will
- insert page breaks in some pretty silly places sometimes
- (like in the middle of a table). For aesthetic purposes, you
- may want to do some manual editing.
-
- Upon entering the proper command to begin the program, you
- will be shown a message displaying the amount of space avail-
- able for the left margin. You will then be asked to enter the
- value you actually want the program to use. The output file
- will then be written. While the output file is being written,
- a "gas gauge" will appear showing what percentage of the oper-
- ation has been completed (see below):
-
- 0¬¬¬10¬¬¬20¬¬¬30¬¬¬40¬¬¬50¬¬¬60¬¬¬70¬¬¬80¬¬¬90¬¬100
- ≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤≤
-
-
- Error Messages
-
- The program can produce several error messages:
-
-
- "Line length too long to add margin."
-
- This message is printed if MARGARINE encounters a line in
- your document that is longer than your specified column width.
- If you have specified a top margin, execution of the program
- continues and top, bottom, and/or page numbers will be added
- normally. If you have not specified a top margin, the DOS
- errorlevel is set to 4 and the program terminates.
-
-
- "Incorrect number of parameters."
-
- This message is printed when you do not enter any parameters
- on the command line, or enter too many parameters. The help
- screen is displayed, the DOS errorlevel is set to 2, and the
- program terminates.
-
- Page 5
-
-
-
-
-
-
-
- "*** Can't open input text file ***"
-
- This message is printed when the input file does not exist
- or is not in the current directory. The DOS errorlevel is set
- to 3 and the program terminates.
-
-
- "*** Invalid entry. Enter number between 0 and n"
-
- This message is printed if you enter a value for the left
- margin that is too large or too small.
-
- The DOS errorlevel is set to 0 upon successful termination
- of the program.
-
- The program is also useful for adding margins to your own
- text file memos, letters, etc. For example, the simple editor
- that I use does not support margins or pagination. I use
- MARGARINE to add a left margin to improve the appearance of my
- documents, and to add top and bottom margins for a more profes-
- sional look. This document was formatted with MARGARINE 3.2
- producing the wide left margin, page breaks, and page numbers
- you see here.
-
-
- REGISTRATION
-
- This program is a copyrighted work. Its use is governed
- strictly under the terms of the license agreement detailed
- below.
-
- You have a limited license to operate this program on your
- computer for a period of no more than 30 days free of charge.
- If, after this trial period, you decide you would like to
- continue using MARGARINE v3.2, you must register the program.
- ANY OTHER USE OF THIS PROGRAM IS A VIOLATION OF COPYRIGHT LAWS.
-
- To register the program, send $14.95 to the address at the
- end of this documentation. Your registration fee gets you:
-
- - The latest version of MARGARINE on disk, with registration
- reminders (nag screens) removed
-
- - Discounts on upgrades to future versions of MARGARINE
-
- - Shareware versions of our other programs
-
-
- DISCLAIMER
-
- This program is guaranteed to do absolutely NOTHING! It
- does, however, in my experience perform reasonably close to
-
- Page 6
-
-
-
-
-
- what is described herein. The author assumes no liability
- for loss or damage caused through the use of this program.
- Before trying the program, especially for the first time
- or on any important text files, make a backup copy of the
- text files you are planning to manipulate. No warranty,
- express or implied, is provided for this software's perform-
- ance, merchantability, or fitness for a particular purpose.
-
- All trademarks are property of their respective owners.
-
-
- ASP OMBUDSMAN
-
- This program is produced by a member of the Association of
- Shareware Professionals (ASP). ASP wants to make sure that
- the shareware principle works for you. If you are unable to
- resolve a shareware-related problem with an ASP member by
- contacting the member directly, ASP may be able to help. The
- ASP Ombudsman can help you resolve a dispute or problem with
- an ASP member, but does not provide technical support for
- members' products. Please write to the ASP Ombudsman at 545
- Grover Road, Muskegon, MI 49442 or send a CompuServe message
- via CompuServe Mail to ASP Ombudsman, 70007,3536.
-
-
- The programs and documentation are Copyright 1991-1993 by Chuck
- Steenburgh and Tay-Jee Software. You are encouraged to distri-
- bute these programs provided the following conditions are met:
-
- - all files contained in the archive or distribution disk
- must be distributed together in UNMODIFIED form
-
- - you charge no more than a reasonable fee for copying or
- subscription, and clearly indicate that payment of such
- a fee does NOT grant ownership of the programs.
-
- Send comments/registrations to:
-
- Tay-Jee Software
- Post Office Box 835
- Lexington, VA 24450
- (703)464-5290
-
- !!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
-
- CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
-
-
- I welcome comments and suggestions from all. I may be
- reached as indicated below:
-
- Tay-Jee Software CIS: 72330,1776
- P.O. Bix 835
- Lexington, VA 24450
-
- Page 7
-
-
-
-
-
- (703)464-5290 evenings
-
- I answer all phone calls, comments, and E-mail!
-
-
- VERSION HISTORY
-
- 3.2 - 27 December 1993: Added /A switch for laser printers
-
- 3.11 - 11 January 1993: Cleaned up menu interface
- Fixed minor bug with Epson conversions
-
- 3.1 - 7 December 1992: Added /E switch for Epson conversions
-
- 3.0 - 12 October 1992: Added /F parameter for form feeds
- Added menu interface
- Added context-sensitive online help
-
- 2.81 - 21 December 1991: Minor bug fix (damn those things!!)
-
- 2.8 - 20 December 1991: Finally got around to reconstruc-
- ting the source code after my hard
- disk crashed
- Added "gas gauge"
- Improved help screen
- Allowed top/bottom/pagination when
- line length was too large for
- adding a left margin
- Improved error tones
-
- 2.7 - 15 August 1991: Cleaned up command line interface
- Added pagination option
- Separate top and bottom margins
-
- 2.6 - 9 August 1991: Buffered I/O improves performance 100
-
- 2.51 - 18 July 1991: Minor bug fix
-
- 2.5 - 17 July 1991: Added support for top and bottom margins
-
- 2.1 - 31 May 1991: Added support for 25-132 column printers
-
- 2.0 - 16 May 1991: Added support for command line
- specification of input/output files
- Sounds tone on error
-
- 1.2 - 16 April 1991: Prevents overwriting existing
- output file
- Allowed user control over margin width
-
- 1.1 - 14 April 1991: Added improved error handling
- procedures
- Allowed user control over output file
- name
-
- Page 8
-
-
-
-
-
-
- 1.0 - 10 April 1991: Initial release
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 9